Imports Microsoft.VisualBasic
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System
Imports System.Data
Imports GTSDAL
Imports GTSDALTableAdapters

Namespace GTSSystem.BLL
    <System.ComponentModel.DataObject()> _
    Public Class ServiceType
        Private _ServiceTypeAdaptor As ServiceTypeTableAdapter = Nothing

        Protected ReadOnly Property ServiceTypeAdaptor() As ServiceTypeTableAdapter
            Get
                If _ServiceTypeAdaptor Is Nothing Then
                    _ServiceTypeAdaptor = New ServiceTypeTableAdapter
                End If
                Return _ServiceTypeAdaptor
            End Get
        End Property

        <System.ComponentModel.DataObjectMethod(ComponentModel.DataObjectMethodType.Select, True)> _
        Public Shared Function GetServiceType() As ServiceTypeDataTable

            Try
                Dim ServiceTypeAdaptor As New GTSDALTableAdapters.ServiceTypeTableAdapter
                Return ServiceTypeAdaptor.GetServiceType
            Catch ex As Exception
                Throw
            End Try
        End Function
        <System.ComponentModel.DataObjectMethod(ComponentModel.DataObjectMethodType.Select, True)> _
        Public Shared Function GetServiceTypeByID(ByVal ServiceTypeID) As ServiceTypeDataTable

            Try
                Dim ServiceTypeAdaptor As New GTSDALTableAdapters.ServiceTypeTableAdapter
                Return ServiceTypeAdaptor.GetServiceTypeByID(ServiceTypeID)
            Catch ex As Exception
                Throw
            End Try
        End Function
    End Class
End Namespace
